package cn.davidsu.library.util;


public class LogUtil {

    public static final String TAG = "app_hi_log";

    public static final String FORMAT = "app_hi_log: %s";

    public static final boolean SYSTEM_OUT_PRINT = true;

    public static void i(String info){
        if (info==null)return;
        int segmentSize = 3*1024;
        while(info.length() > segmentSize) {
            String logInfo = info.substring(0, segmentSize);
            info = info.replace(logInfo, "");
            print(logInfo);
        }
        print(info);
    }

    public static void i(String format, Object... args){
        i(String.format(format, args));
    }

    private static void print(String info){
        if (SYSTEM_OUT_PRINT)System.out.println(String.format(FORMAT, info));
    }


}
